package com.smartcanteen.system.api.clients;

import com.smartcanteen.system.api.domain.dto.CategoryDTO;
import com.smartcanteen.system.api.domain.entity.Category;
import com.smartcanteen.system.api.domain.entity.Dish;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient("smartcanteen-dish")
public interface DishClient {
    @GetMapping("/user/dish/getById/{id}")
    Dish getById(@PathVariable("id") Integer id);

    @PostMapping("/admin/category/api/add")
    void addCategoryForApi(@RequestBody CategoryDTO categoryDTO);

    @GetMapping(value = "/admin/category/api/getidbyname")
    Category getByName(@RequestParam("name") String name);
}
